﻿using System;

namespace MulticastDelegate
{
    class Program
    {
        static void Main(string[] args)
        {
            Action del1 = () => Console.WriteLine("del 1");
            Action del2 = () => Console.WriteLine("del 2");
            Action del3 = () => Console.WriteLine("del 3");
            del3 += del1;
            del3 += del2;
            del3 += () => Console.WriteLine("end");
            del3 -= del1;

            del1();
            Console.WriteLine("-------------");
            del2();
            Console.WriteLine("-------------");
            del3();
            Console.ReadKey();
        }
    }
}
